home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Tele
/
S
/
SEND AN ESCAPE
< prev
next >
Wrap
Text File
|
1991-01-02
|
4KB
|
94 lines
HOW TO FORCE SECOND SIGHT TO SEND AN ESCAPE CHARACTER v2
While it recently became possible to change Second Sight so that
it would display and send a number of graphics characters in the
IBM ANSI character set, until now it wasn't possible to send any
of the escape sequences which allow use of cursor control, alternate
character styles, and animation although most terminal packages were
able to use them. This 'quick and dirty' fix will allow you to send
these sequences to your users.
The reason you can not send these commands is because Second Sight
refuses to acknowledge any characters below ASCII #32 ($20) except
for the backspace, return, etc. There is a line in the program that
compares all sent and displayed characters to 32 (a space) and if it
is lower it will not print it. If Second Sight were written in Pascal,
it might look like this:
If Character >= asc(32) then Print(Character)
else
SysBeep(1);
This little fix changes the 'asc(32)' in our example to 'asc(27)', which
tells Second Sight to print any character above ASCII #27 ($1B) which is
the ASCII code for escape. Thus, when Second Sight comes across with an
escape character - whether in a menu, text file, or simply entered by
the user - it will print that character.
You should be aware that because Second Sight does not have the ability
to actually display ansi codes, what you see on the screen will not be
bold, inversed, etc. Whenever you use an escape code, all you will see
is the actual sequence. However, your users will not see this text, but
rather the result of the code.
Oh, I almost forgot to mention that this little fix also lets you use
color as well.
Down to business. The following is an explaination of how to change
Second Sight to send escape characters. Remember,
-----------------------------------------------------------------------
ONLY MAKE THESE CHANGES ON A COPY OF SECOND SIGHT..NOT ON YOUR ORIGINAL.
-----------------------------------------------------------------------
I take no responsibility (and I'm sure Freesoft won't either) for any
distruction this causes to your copy of Second Sight, so do this only on
a backup copy of the program.
THE PROCEDURE
-------------
What you need: Copy of Second Sight
Hex file editor with search function (SUM, for ex.)
1) Open Second Sight with your text editor. Make sure you are editing
the resource fork.
2) Search for the hexidecimal string: 0020 6400 0138 7000
3) Change '0020' in the above string to '001A'.
4) Search for the hexidecimal string: 001F 6300 0074 7000 102D
5) Change '001F' in the above string to '001A'.
6) Save your changes.
Once you have made these changes, Second Sight will now send escape
characters (as well as all of the characters above it.
It is possible to change the '0020' (space) to any character you wish.
However, I don't recommend this and I certainly would not make the
number lower than '$000E', since if you do, Second Sight will no longer
be able to properly handle carraige returns ($000D) or backspaces
($0008) or other necessary characters. However, testing this change has
shown that changing the '$0020' limitation to escape '$001B' has no
negative effects.
If you have any questions about this procedure, or how to use the escape
codes to generate bold, inverse, underlined or colored characters,
please feel free to send me mail.
-Mark
Mark Kupferman
25 St. Stephen Street, #6
Boston, MA 02115
GEnie: M.S.K.
America Online: MSK
Internet: mkupferman@lynx.northeastern.edu
BBS: Tao of Telecom/(617) 536-6419 (up again soon)